package com.sina.microblog.data
{
	import com.weibo.charts.ui.dots.NullDot;

	/**
	 * MicroBlogComment是一个数据封装类(Value Object)，该类代表一条评论
	 */ 
	public class MicroBlogComment
	{
		
		/**
		 *  评论的源微博
		 * 
		 */
		public var status:MicroBlogStatus;
		
		/**
		 * 评论的创建时间
		 */ 
		public var createdAt:Date;
		
		/**
		 * 字符串型的ID
		 */ 
		public var idstr:String;
		
		/**
		 * 评论的ID
		 */ 
		public var id:String;
		/**
		 * 评论的内容
		 */ 
		public var text:String;
		/**
		 * 评论的来源
		 */ 
		public var source:String;
		
		/**
		 * 评论MID
		 */ 
		public var mid:String;
		
		public var user:MicroBlogUser;	
		
		public function MicroBlogComment(comment:Object)
		{
			if(comment != null)
			{
				this.createdAt = MicroBlogDataUtil.resolveDate(comment["created_at"]);
				this.id = comment["id"];
				this.idstr = comment["id"].toString();
				this.text = comment["text"];
				this.source = comment["source"];
				this.mid    = comment["mid"];
				this.user   =  new MicroBlogUser(comment["user"]);
				
				if(comment["status"] != null)
				{
					this.status = new MicroBlogStatus(comment["status"]);
				}
			}
		}
	}
}